package com.xiaoshuidi.cloud.module.iot.service;


import com.xiaoshuidi.cloud.module.iot.api.device.vo.WaterMeterCommonResponseModel;
import com.xiaoshuidi.cloud.module.iot.common.ResultModel;
import com.xiaoshuidi.cloud.module.iot.dal.model.ammeter.AmmeterSwitchOnOffResVO;
import com.xiaoshuidi.cloud.module.iot.dal.model.watermeter.*;
import com.xiaoshuidi.cloud.module.iot.dal.model.watermeter.details.WaterMeterReportRequestModel;
import com.xiaoshuidi.cloud.module.iot.dal.model.watermeter.details.WaterMeterReportResponseModel;

/**
 * @author arvin
 * @date 2019-07-04 16:51
 * @description 第三方公共业务-水表
 */
public interface WaterMeterService {

    /**
     * 第三方公共业务-刷新水表
     *
     * @param waterMeterCommonResponseModel
     * @return
     */
    ResultModel<WaterMeterCommonResponseModel> refreshWatermeterInfo(WaterMeterCommonResponseModel waterMeterCommonResponseModel) throws Exception;


    /**
     * 第三方公共业务-水表退租
     *
     * @param watermeterRecedeReqVO
     * @return
     */
    ResultModel<WatermeterRecedeResVO> recedeWatermeter(WatermeterRecedeReqVO watermeterRecedeReqVO) throws Exception;

    /**
     * 第三方公共业务-水表入住
     *
     * @param watermeterRecedeReqVO
     * @return
     */
    ResultModel<WatermeterStayResVO> stayWatermeter(WatermeterStayReqVO watermeterRecedeReqVO) throws Exception;


    /**
     * 根据设备编号获取电表详情
     *
     * @param waterMeterCommonRequestModel
     * @return
     */
    ResultModel<WaterMeterCommonResponseModel> getWatermeterInfo(WaterMeterCommonRequestModel waterMeterCommonRequestModel);

    /**
     * 刷新水表详情
     *
     * @param waterMeterCommonRequestModel
     * @return
     */
    ResultModel<WaterMeterCommonResponseModel> refreshWatermeterInfo(WaterMeterCommonRequestModel waterMeterCommonRequestModel) throws Exception;

    /**
     * 异步刷新水表详情，部分厂商是异步刷新机制
     * @param waterMeterCommonRequestModel
     * @return
     * @throws Exception
     */
    ResultModel<WaterMeterCommonResponseModel> refreshWatermeterInfoAsync(WaterMeterCommonRequestModel waterMeterCommonRequestModel) throws Exception;

    /**
     * 用水明细(冷水,热水)
     *
     * @param waterMeterReportRequestModel
     * @return
     */
    ResultModel<WaterMeterReportResponseModel> getWatermeterReport(WaterMeterReportRequestModel waterMeterReportRequestModel);


    /**
     * 设置水表停水
     * @param waterMeterSwitchOnOffReqVO
     * @return
     */
    ResultModel<WaterMeterSwitchOnOffResVO> setWaterMeterSwitchOff(WaterMeterSwitchOnOffReqVO waterMeterSwitchOnOffReqVO) throws Exception;

    /**
     * 设置水表开阀供水
     * @param waterMeterSwitchOnOffReqVO
     * @return
     */
    ResultModel<WaterMeterSwitchOnOffResVO> setWaterMeterSwitchOn(WaterMeterSwitchOnOffReqVO waterMeterSwitchOnOffReqVO) throws Exception;


    void disposeDeviceDosage(WaterMeterCommonResponseModel waterMeterCommonResponseModel, boolean charging);
}
